/*
 * Emprunt.java
 *
 * Created on 17 avril 2007, 18:29
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

/**
 * Entity class Emprunt
 *
 * @author amo-yas
 */
@Entity
public class Emprunt implements Serializable
{
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int idEnprunt;
    private int dureeMaxEmprunt;
    private int dureeEnprunt;
    private int dateEmprunt;
    private double montantMax;
    private double montant;
    private double taux;
    private double capitalRestant;
    private String etatEmprunt; // aSouscrire,Nouveau,ATerme,AvantTerme,Clos,Annule
    private int idEntreprise;
    @OneToOne
    private Banque saBanque;
    
    /** Creates a new instance of Emprunt */
    public Emprunt()
    {
        
    }
    
    /**
     * Returns a hash code value for the object.  This implementation computes
     * a hash code value based on the id fields in this object.
     * @return a hash code value for this object.
     */
    
    public int getIdEnprunt()
    {
        return idEnprunt;
    }
    
    public void setIdEnprunt(int idEnprunt)
    {
        this.idEnprunt = idEnprunt;
    }
    
    public int getDureeEnprunt()
    {
        return dureeEnprunt;
    }
    
    public void setDureeEnprunt(int dureeEnprunt)
    {
        this.dureeEnprunt = dureeEnprunt;
    }
    
    public int getDateEmprunt()
    {
        return dateEmprunt;
    }
    
    public void setDateEmprunt(int dateEmprunt)
    {
        this.dateEmprunt = dateEmprunt;
    }
    
    public double getMontant()
    {
        return montant;
    }
    
    public void setMontant(double montant)
    {
        this.montant = montant;
    }
    
    public double getTaux()
    {
        return taux;
    }
    
    public void setTaux(double taux)
    {
        this.taux = taux;
    }
    
    public double getCapitalRestant()
    {
        return capitalRestant;
    }
    
    public void setCapitalRestant(double capitalRestant)
    {
        this.capitalRestant = capitalRestant;
    }
    
    public String getEtatEmprunt()
    {
        return etatEmprunt;
    }
    
    public void setEtatEmprunt(String etatEmprunt)
    {
        this.etatEmprunt = etatEmprunt;
    }
    
    public Banque getSaBanque()
    {
        return saBanque;
    }
    
    public void setSaBanque(Banque saBanque)
    {
        this.saBanque = saBanque;
    }

    public int getDureeMaxEmprunt()
    {
        return dureeMaxEmprunt;
    }

    public void setDureeMaxEmprunt(int dureeMaxEmprunt)
    {
        this.dureeMaxEmprunt = dureeMaxEmprunt;
    }

    public double getMontantMax()
    {
        return montantMax;
    }

    public void setMontantMax(double montantMax)
    {
        this.montantMax = montantMax;
    }

    public int getIdEntreprise()
    {
        return idEntreprise;
    }

    public void setIdEntreprise(int idEntreprise)
    {
        this.idEntreprise = idEntreprise;
    }

    
    
}
